This application claims priority from Korean Patent Application No. 10-2005-0089692, filed on Sep. 27, 2005, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference.
1. Field of the Invention
Methods and systems consistent with the present invention relate to updating software, and more particularly, to a booting method for updating software components installed in a system and recovering from an error that occurs during the update, a method and system for automatically updating the software and recovering from the error, and a computer readable recording medium storing the method.
2. Description of the Related Art
A kernel is the core of a related art operating system (OS). When an automatic update of a kernel image is stopped due to a system crash, it is impossible to even boot the OS.
FIG. 1 is a block diagram of a boot region of a related art system. Referring to FIG. 1, a current image 110 is a binary image combining an OS and an application. A boot loader 120, which is a code executed to start a system, loads the current image 110 into random access memory (RAM) and executes the loaded image to boot the system. The boot region has a disadvantage in that when an update of the current image 110 fails, it is impossible to automatically recover the failed update. Also, the boot region does not provide functions of updating several software components and recovering.
FIG. 2 is a block diagram of a boot region of another related art system, which automatically updates a kernel using an update validity confirmation repository 230. Referring to FIG. 2, when the kernel is updated, a current image 220 is copied into a backup repository to generate a backup image 210, and a new image 220 is downloaded. If there is any trouble with the booting of the system, a boot loader 240 checks an update validity based on the update validity confirmation repository 230 and copies the backup image 210 into the new image 220 to reboot the system. This related art system has a disadvantage in that the entire backup image 210 is copied to recover the system. Therefore, the related art system is not efficient, since it usually takes about 20 to 30 seconds to copy a kernel image of 12 Mbytes (megabytes) in a flash memory.
FIG. 3 is a block diagram of a boot region of another related art system, which automatically updates a kernel using two boot loaders 330 and 340. Referring to FIG. 3, when the kernel is updated, a current image 320 is copied to a backup repository to generate a backup image 310, and a new image 320 is downloaded. If there is any trouble with the booting when a first boot loader 340 is executed, a second boot loader 330 is executed to load the backup image 310. This related art system has a disadvantage in that the system should have a function of physically executing two boot loaders 330 and 340.
Accordingly, a technology for automatically updating the kernel and effectively recovering the system when an update error occurs is required. Also, the technology must perform an update rollback when an error occurs in updating several software components, including the kernel. More specifically, the technology must automatically recover the software to its previous state (e.g., to a last rebooting point) when the update error occurs, in order to provide reliability of a software automatic update.